﻿using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace NewWms
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            // 或者使用以下代码实现真正的全屏，无标题栏和边框
     
        }
        private void Border_Click(object sender, RoutedEventArgs e)
        {
            var border = (Border)sender;

            // Check if the background is already red to avoid unnecessary animations
            if ((border.Background as SolidColorBrush)?.Color != Colors.Red)
            {
                // Find the storyboard defined in resources and begin it
                var storyboard = border.FindResource("ChangeBackgroundColor") as Storyboard;
                storyboard?.Begin(border);
            }
        }
    }
}